package onjava.advance.ch01.sec07;

import static onjava.advance.ch01.sec07.Food.*;
/**
 * @author yangdc
 * @date 9/23/25 00:26
 */
public class TypeOfFood {
    public static void main(String[] args) {
        // 向上转型为Food
        Food food = Appetizer.SALAD;
        food = MainCourse.LASAGNE;
        food = Dessert.GELATO;
        food = Coffee.CAPPUCCINO;
    }
}
